package guoanmaker.provider.business.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import java.util.Collection;
import java.util.Date;


import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonManagedReference;


import guoanmaker.provider.helper.common.abstractobj.IdEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="t_provide_business")
public class ProviderBusiness extends IdEntity {
	private String businessName;//商户名称
	private Integer IdentityType;//身份类型 (企业服务商)
	private String companyLogo;//公司logo
	private String LicensPhone;
	private String companyIntroduce;//公司介绍
	private String companyName;
	private String companyResgiserMark;//营业执照注册号
	private String companyLicenseReplica;//营业执照副本扫描件
	private String companyOtherReplica;//手持身份证正面照片
	private String companyCorporationName;//企业联系人真实姓名
	private Integer voucherType;//证件类型  
	private String voucherEffectiveType;//证件有效期类型  1定时，0长期
	private Date voucherEffectiveDate;//证件有效日期
	private String companyCorporationIDCardNo;//法人身份证号
	private String companyCorporationIDCardNoFront;//身份证照片正面
	private String companyCorporationIDCardNoContrary;//身份证反面
	private String companyAdress;
	private String companyProvince;
	private String companyCity;
	private String companyArea;
	private String busAgelimit;//营业年限类型
	private Date busAgelimitDate;//营业年限日期
	private String orgCodeCard;//组织机构代码证
	private String orgCodeCardPicture;//组织机构代码证图片
	private String commoditys;//服务项列表
	private String new_commoditys;//修改服务项列表
	private Date   createDate;
	private String busNumber;//服务商编号
	private Integer service_range;//服务范围状态 1---待审核  2---审核成功  3----审核失败
	private String serviceAreas;;//服务地区 我在商户表加了一个服务地区
	private Date rangeModTime;  //服务范围修改时间
	private String introduce; //店铺介绍 备份字段
	private String bannerForPc;  //店铺banner pc端的备份


	private String banner;  //店铺对应的商户焦点图 app端
	private Integer isRoomServer; //是否提供空间服务 1:提供 2:不提供
	@OneToOne 
	private PersonalUser personalUser;
	private String shopId;

	
	@OneToMany(mappedBy="providerBusiness",fetch=FetchType.LAZY,cascade={CascadeType.ALL})
	@JsonManagedReference
	private List<ProvideCommodity> ProvideCommodity;

	 @Transient
	 private List<OperatorServerClass> serverClasss;

	public ProviderBusiness(String businessName, Integer identityType, String companyLogo, String licensPhone, String companyIntroduce, String companyName, String companyResgiserMark, String companyLicenseReplica, String companyOtherReplica, String companyCorporationName, Integer voucherType, String voucherEffectiveType, Date voucherEffectiveDate, String companyCorporationIDCardNo, String companyCorporationIDCardNoFront, String companyCorporationIDCardNoContrary, String companyAdress, String companyProvince, String companyCity, String companyArea, String busAgelimit, Date busAgelimitDate, String orgCodeCard, String orgCodeCardPicture, String commoditys, String new_commoditys, Date createDate, String busNumber, Integer service_range, String serviceAreas, Integer isRoomServer, PersonalUser personalUser, List<guoanmaker.provider.business.model.ProvideCommodity> provideCommodity, List<OperatorServerClass> serverClasss) {
		this.businessName = businessName;
		IdentityType = identityType;
		this.companyLogo = companyLogo;
		LicensPhone = licensPhone;
		this.companyIntroduce = companyIntroduce;
		this.companyName = companyName;
		this.companyResgiserMark = companyResgiserMark;
		this.companyLicenseReplica = companyLicenseReplica;
		this.companyOtherReplica = companyOtherReplica;
		this.companyCorporationName = companyCorporationName;
		this.voucherType = voucherType;
		this.voucherEffectiveType = voucherEffectiveType;
		this.voucherEffectiveDate = voucherEffectiveDate;
		this.companyCorporationIDCardNo = companyCorporationIDCardNo;
		this.companyCorporationIDCardNoFront = companyCorporationIDCardNoFront;
		this.companyCorporationIDCardNoContrary = companyCorporationIDCardNoContrary;
		this.companyAdress = companyAdress;
		this.companyProvince = companyProvince;
		this.companyCity = companyCity;
		this.companyArea = companyArea;
		this.busAgelimit = busAgelimit;
		this.busAgelimitDate = busAgelimitDate;
		this.orgCodeCard = orgCodeCard;
		this.orgCodeCardPicture = orgCodeCardPicture;
		this.commoditys = commoditys;
		this.new_commoditys = new_commoditys;
		this.createDate = createDate;
		this.busNumber = busNumber;
		this.service_range = service_range;
		this.serviceAreas = serviceAreas;
		this.isRoomServer = isRoomServer;
		this.personalUser = personalUser;
		ProvideCommodity = provideCommodity;
		this.serverClasss = serverClasss;
	}

	public ProviderBusiness(String businessName, Integer identityType, String companyLogo, String licensPhone, String companyIntroduce, String companyName, String companyResgiserMark, String companyLicenseReplica, String companyOtherReplica, String companyCorporationName, Integer voucherType, String voucherEffectiveType, Date voucherEffectiveDate, String companyCorporationIDCardNo, String companyCorporationIDCardNoFront, String companyCorporationIDCardNoContrary, String companyAdress, String companyProvince, String companyCity, String companyArea, String busAgelimit, Date busAgelimitDate, String orgCodeCard, String orgCodeCardPicture, String commoditys, String new_commoditys, Date createDate, String busNumber, Integer service_range, String serviceAreas, Date rangeModTime, String banner, Integer isRoomServer, PersonalUser personalUser, List<guoanmaker.provider.business.model.ProvideCommodity> provideCommodity, List<OperatorServerClass> serverClasss) {
		this.businessName = businessName;
		IdentityType = identityType;
		this.companyLogo = companyLogo;
		LicensPhone = licensPhone;
		this.companyIntroduce = companyIntroduce;
		this.companyName = companyName;
		this.companyResgiserMark = companyResgiserMark;
		this.companyLicenseReplica = companyLicenseReplica;
		this.companyOtherReplica = companyOtherReplica;
		this.companyCorporationName = companyCorporationName;
		this.voucherType = voucherType;
		this.voucherEffectiveType = voucherEffectiveType;
		this.voucherEffectiveDate = voucherEffectiveDate;
		this.companyCorporationIDCardNo = companyCorporationIDCardNo;
		this.companyCorporationIDCardNoFront = companyCorporationIDCardNoFront;
		this.companyCorporationIDCardNoContrary = companyCorporationIDCardNoContrary;
		this.companyAdress = companyAdress;
		this.companyProvince = companyProvince;
		this.companyCity = companyCity;
		this.companyArea = companyArea;
		this.busAgelimit = busAgelimit;
		this.busAgelimitDate = busAgelimitDate;
		this.orgCodeCard = orgCodeCard;
		this.orgCodeCardPicture = orgCodeCardPicture;
		this.commoditys = commoditys;
		this.new_commoditys = new_commoditys;
		this.createDate = createDate;
		this.busNumber = busNumber;
		this.service_range = service_range;
		this.serviceAreas = serviceAreas;
		this.rangeModTime = rangeModTime;
		this.banner = banner;
		this.isRoomServer = isRoomServer;
		this.personalUser = personalUser;
		ProvideCommodity = provideCommodity;
		this.serverClasss = serverClasss;
	}

	public ProviderBusiness(String businessName, Integer identityType, String companyLogo, String licensPhone, String companyIntroduce, String companyName, String companyResgiserMark, String companyLicenseReplica, String companyOtherReplica, String companyCorporationName, Integer voucherType, String voucherEffectiveType, Date voucherEffectiveDate, String companyCorporationIDCardNo, String companyCorporationIDCardNoFront, String companyCorporationIDCardNoContrary, String companyAdress, String companyProvince, String companyCity, String companyArea, String busAgelimit, Date busAgelimitDate, String orgCodeCard, String orgCodeCardPicture, String commoditys, String new_commoditys, Date createDate, String busNumber, Integer service_range, String serviceAreas, Date rangeModTime, String banner, Integer isRoomServer, PersonalUser personalUser, String shopId, List<guoanmaker.provider.business.model.ProvideCommodity> provideCommodity, List<OperatorServerClass> serverClasss) {
		this.businessName = businessName;
		IdentityType = identityType;
		this.companyLogo = companyLogo;
		LicensPhone = licensPhone;
		this.companyIntroduce = companyIntroduce;
		this.companyName = companyName;
		this.companyResgiserMark = companyResgiserMark;
		this.companyLicenseReplica = companyLicenseReplica;
		this.companyOtherReplica = companyOtherReplica;
		this.companyCorporationName = companyCorporationName;
		this.voucherType = voucherType;
		this.voucherEffectiveType = voucherEffectiveType;
		this.voucherEffectiveDate = voucherEffectiveDate;
		this.companyCorporationIDCardNo = companyCorporationIDCardNo;
		this.companyCorporationIDCardNoFront = companyCorporationIDCardNoFront;
		this.companyCorporationIDCardNoContrary = companyCorporationIDCardNoContrary;
		this.companyAdress = companyAdress;
		this.companyProvince = companyProvince;
		this.companyCity = companyCity;
		this.companyArea = companyArea;
		this.busAgelimit = busAgelimit;
		this.busAgelimitDate = busAgelimitDate;
		this.orgCodeCard = orgCodeCard;
		this.orgCodeCardPicture = orgCodeCardPicture;
		this.commoditys = commoditys;
		this.new_commoditys = new_commoditys;
		this.createDate = createDate;
		this.busNumber = busNumber;
		this.service_range = service_range;
		this.serviceAreas = serviceAreas;
		this.rangeModTime = rangeModTime;
		this.banner = banner;
		this.isRoomServer = isRoomServer;
		this.personalUser = personalUser;
		this.shopId = shopId;
		ProvideCommodity = provideCommodity;
		this.serverClasss = serverClasss;
	}
}
